package com.swt.draw.dao;

import com.swt.draw.entity.Admin;

import java.util.List;

import com.swt.draw.example.AdminExample;
import com.swt.draw.vo.AdminDetailVO;
import org.apache.ibatis.annotations.Param;

public interface AdminMapper {
    long countByExample(AdminExample example);

    int deleteByExample(AdminExample example);

    int deleteByPrimaryKey(String adminNo);

    int insert(Admin record);

    int insertSelective(Admin record);

    List<Admin> selectByExample(AdminExample example);

    Admin selectByPrimaryKey(String adminNo);

    int updateByExampleSelective(@Param("record") Admin record, @Param("example") AdminExample example);

    int updateByExample(@Param("record") Admin record, @Param("example") AdminExample example);

    int updateByPrimaryKeySelective(Admin record);

    int updateByPrimaryKey(Admin record);

    /*根据用户编号查询详情*/
    AdminDetailVO getAdminDetailInfoByNo(@Param("adminNo") String adminNo);
    /*查询用户+部门信息*/
    List<AdminDetailVO> selectAdminWithDep(@Param("start") Integer start, @Param("end") Integer end, @Param("departmentNos") String[] departmentNos, @Param("admin") Admin admin);
    /*查询用户+部门信息总数*/
    Long selectAdminCount(@Param("departmentNos") String[] departmentNos, @Param("admin") Admin admin);
}
